package remotecontrolcase.command.stereo;

import remotecontrolcase.command.Command;
import remotecontrolcase.component.Stereo;

/**
 * description:
 *  打开音响命令类
 * @author yuanmenglv on 2019/11/30
 */
public class StereoOnCommand implements Command {
    private Stereo stereo;

    public StereoOnCommand(Stereo stereo) {
        this.stereo = stereo;
    }

    @Override
    public void execute() {
        stereo.setCD("许嵩专辑");
        stereo.on();
    }

    @Override
    public void undo() {
        System.out.println("撤销中");
        stereo.off();
    }
}
